package com.gxa.saas.service.impl;

import com.gxa.saas.mapper.PurchaseMapper;
import com.gxa.saas.mapper.StorageMapper;
import com.gxa.saas.pojo.Purchase;
import com.gxa.saas.pojo.Storage;
import com.gxa.saas.service.PurchaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @author wxz
 */
@Service
public class PurchaseServiceImpl implements PurchaseService {

    @Autowired
    PurchaseMapper purchaseMapper;
    @Autowired
    PurchaseService purchaseService;
    @Autowired
    StorageMapper storageMapper;


    @Override
    public List<Purchase> selectByPage(Integer offset, Integer size) {
        return purchaseMapper.selectByPage(offset,size);
    }

    @Override
    public Integer deleteById(Integer id) {
        return purchaseMapper.deleteById(id);
    }

    @Override
    public List<Purchase> selectAll() {
        return purchaseMapper.selectAll();
    }

    @Override
    public Integer updateStatus(Integer id,String comments,Integer status) {
        return purchaseMapper.updateStatus(id,comments,status);
    }

    @Override
    public List<Purchase> selectByName(Map map) {
        return purchaseMapper.selectByName(map);
    }

    @Override
    public Integer getTotal() {
        return purchaseMapper.getTotal();
    }

    @Override
    public List<Purchase> selectById(Integer id) {
        return purchaseMapper.selectById(id);
    }


}
